<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python documentation Index' />
<link rel="first" href="lib.html" title='Python library Reference' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="next" href="form-objects.html" />
<link rel="prev" href="module-fl.html" />
<link rel="parent" href="module-fl.html" />
<link rel="next" href="form-objects.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name='aesop' content='information' />
<title>34.4.1 Functions Defined in Module fl</title>
</head>
<body>
<div class="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="34.4 fl  "
  href="module-fl.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="34.4 fl  "
  href="module-fl.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="34.4.2 form Objects"
  href="form-objects.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-fl.html">34.4 fl  </a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-fl.html">34.4 fl  </a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="form-objects.html">34.4.2 Form Objects</a>
</div>
<hr /></div>
</div>
<!--End of Navigation Panel-->

<h2><a name="SECTION0036410000000000000000">
34.4.1 Functions Defined in Module <tt class="module">fl</tt></a>
</h2>
<a name="FL_Functions"></a>
<p>
Module <tt class="module">fl</tt> defines the following functions.  For more
information about what they do, see the description of the equivalent
C function in the FORMS documentation:

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5625' xml:id='l2h-5625' class="function">make_form</tt></b>(</nobr></td>
  <td><var>type, width, height</var>)</td></tr></table></dt>
<dd>
Create a form with given type, width and height.  This returns a
<i class="dfn">form</i> object, whose methods are described below.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5626' xml:id='l2h-5626' class="function">do_forms</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd>
The standard FORMS main loop.  Returns a Python object representing
the FORMS object needing interaction, or the special value
<tt class="constant">FL.EVENT</tt>.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5627' xml:id='l2h-5627' class="function">check_forms</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd>
Check for FORMS events.  Returns what <tt class="function">do_forms()</tt> above
returns, or <code>None</code> if there is no event that immediately needs
interaction.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5628' xml:id='l2h-5628' class="function">set_event_call_back</tt></b>(</nobr></td>
  <td><var>function</var>)</td></tr></table></dt>
<dd>
Set the event callback function.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5629' xml:id='l2h-5629' class="function">set_graphics_mode</tt></b>(</nobr></td>
  <td><var>rgbmode, doublebuffering</var>)</td></tr></table></dt>
<dd>
Set the graphics modes.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5630' xml:id='l2h-5630' class="function">get_rgbmode</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd>
Return the current rgb mode.  This is the value of the C global
variable <tt class="cdata">fl_rgbmode</tt>.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5631' xml:id='l2h-5631' class="function">show_message</tt></b>(</nobr></td>
  <td><var>str1, str2, str3</var>)</td></tr></table></dt>
<dd>
Show a dialog box with a three-line message and an OK button.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5632' xml:id='l2h-5632' class="function">show_question</tt></b>(</nobr></td>
  <td><var>str1, str2, str3</var>)</td></tr></table></dt>
<dd>
Show a dialog box with a three-line message and YES and NO buttons.
It returns <code>1</code> if the user pressed YES, <code>0</code> if NO.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5633' xml:id='l2h-5633' class="function">show_choice</tt></b>(</nobr></td>
  <td><var>str1, str2, str3, but1</var><big>[</big><var>,
                              but2</var><big>[</big><var>, but3</var><big>]</big><var></var><big>]</big><var></var>)</td></tr></table></dt>
<dd>
Show a dialog box with a three-line message and up to three buttons.
It returns the number of the button clicked by the user
(<code>1</code>, <code>2</code> or <code>3</code>).
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5634' xml:id='l2h-5634' class="function">show_input</tt></b>(</nobr></td>
  <td><var>prompt, default</var>)</td></tr></table></dt>
<dd>
Show a dialog box with a one-line prompt message and text field in
which the user can enter a string.  The second argument is the default
input string.  It returns the string value as edited by the user.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5635' xml:id='l2h-5635' class="function">show_file_selector</tt></b>(</nobr></td>
  <td><var>message, directory, pattern, default</var>)</td></tr></table></dt>
<dd>
Show a dialog box in which the user can select a file.  It returns
the absolute filename selected by the user, or <code>None</code> if the user
presses Cancel.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5636' xml:id='l2h-5636' class="function">get_directory</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd>
<dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">get_pattern</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">get_filename</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd>These functions return the directory, pattern and filename (the tail
part only) selected by the user in the last
<tt class="function">show_file_selector()</tt> call.
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5639' xml:id='l2h-5639' class="function">qdevice</tt></b>(</nobr></td>
  <td><var>dev</var>)</td></tr></table></dt>
<dd>
<dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">unqdevice</tt></b>(</nobr></td>
  <td><var>dev</var>)</td></tr></table></dt>
<dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">isqueued</tt></b>(</nobr></td>
  <td><var>dev</var>)</td></tr></table></dt>
<dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">qtest</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">qread</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">qreset</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">qenter</tt></b>(</nobr></td>
  <td><var>dev, val</var>)</td></tr></table></dt>
<dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">get_mouse</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">tie</tt></b>(</nobr></td>
  <td><var>button, valuator1, valuator2</var>)</td></tr></table></dt>
<dd>These functions are the FORMS interfaces to the corresponding GL
functions.  Use these if you want to handle some GL events yourself
when using <tt class="function">fl.do_events()</tt>.  When a GL event is detected that
FORMS cannot handle, <tt class="function">fl.do_forms()</tt> returns the special value
<tt class="constant">FL.EVENT</tt> and you should call <tt class="function">fl.qread()</tt> to read
the event from the queue.  Don't use the equivalent GL functions!
</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-5648' xml:id='l2h-5648' class="function">color</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd>
<dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">mapcolor</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt class="function">getmcolor</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd>See the description in the FORMS documentation of
<tt class="cfunction">fl_color()</tt>, <tt class="cfunction">fl_mapcolor()</tt> and
<tt class="cfunction">fl_getmcolor()</tt>.
</dl>

<p>

<div class="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="34.4 fl  "
  href="module-fl.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="34.4 fl  "
  href="module-fl.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="34.4.2 form Objects"
  href="form-objects.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-fl.html">34.4 fl  </a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-fl.html">34.4 fl  </a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="form-objects.html">34.4.2 Form Objects</a>
</div>
</div>
<hr />
<span class="release-info">Release 2.5.1, documentation updated on 18th April, 2007.</span>
</div>
<!--End of Navigation Panel-->
<address>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</address>
</body>
</html>
